package com.cictec.middleware.gps.engine.utils;

import com.cictec.middleware.commons.utils.log.MultiLog;
import com.cictec.middleware.commons.utils.log.MultiLogFileNameUtils;
import com.cictec.middleware.commons.utils.log.MultiLogUtils;
import com.cictec.middleware.gps.engine.BusInstance;

public class MultiLogUtil {

	public static MultiLog getPositionJudgeLog(BusInstance busInstance){
		String logPath = MultiLogFileNameUtils.getPositionJudgeLogName(busInstance.getLineName(), busInstance.getDevCode() + "-"+busInstance.getBusNumber());
		MultiLog log = MultiLogUtils.getMultiLog(logPath);
		return log;
	}
	
	public static MultiLog getBusMileageLog(String date, BusInstance busInstance){
		return getBusMileageLog(date, busInstance.getDevCode(), busInstance.getBusNumber());
	}
	public static MultiLog getBusMileageLog(String date, String devCode, String busNumber){
		String logPath = MultiLogFileNameUtils.getBusMileageLogName(date, devCode + "-"+busNumber);
		MultiLog log = MultiLogUtils.getMultiLog(logPath);
		return log;
	}
	

}
